home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Science / µSim 1.0b5 folder / Libs / RIncludes / StdAlert.r
Encoding:
Text File  |  1994-01-05  |  2.6 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2. Copyright © 1993,1994 by Fabrizio Oddone
  3. ••• ••• ••• ••• ••• ••• ••• ••• ••• •••
  4. This source code is distributed as freeware: you can copy, exchange, modify this
  5. code as you wish. You may include this code in any kind of application: freeware,
  6. shareware, or commercial, provided that full credits are given.
  7. You may not sell or distribute this code for profit.
  8. */
  9.  
  10. #define A                    13    // white space between most elements
  11. #define B                    23    // white space to left and right of icon
  12.  
  13. //#define NumTextLines        4    // number of lines of text in the alert
  14. #define NumAltTextLines        0
  15.  
  16. #define LineHeight            16    // height of a single line of Chicago-12
  17. #define ButtonHeight        20    // standard button height
  18.  
  19. #ifdef    __USVersion__
  20. #define LongestBtnName        41    // width of “Cancel” in Chicago-12
  21. #define DontSaveBtnName        67    // width of “Don’t Save” in Chicago-12
  22. #endif    __USVersion__
  23.  
  24. #ifdef    __VersioneItaliana__
  25. #define LongestBtnName        46    // width of “Annulla” in Chicago-12
  26. #define DontSaveBtnName        96    // width of “Non Registrare” in Chicago-12
  27. #endif    __VersioneItaliana__
  28.  
  29. #define LongestButtonName    LongestBtnName    // placeholder
  30. #define DontSaveButtonName    DontSaveBtnName    // placeholder
  31.  
  32. #define DontSaveButtonWidth    (DontSaveButtonName + 18)
  33. #define ButtonWidth            (LongestButtonName + 18)
  34.  
  35. #define AlrtWidth            354    // chosen to make the right margin = A
  36. #define AlertWidth            AlrtWidth    // placeholder
  37.  
  38. #define IconLeft            (B - 3)
  39. #define IconRight            (IconLeft + 32)
  40. #define IconTop                (A - 3)
  41. #define IconBottom            (IconTop + 32)
  42.  
  43. #define TextLeft            (IconRight + (B - 1))
  44. #define TextRight            (AlertWidth - (A - 3))
  45. #define TextTop                (A - 6)
  46. #define TextBottom            (TextTop + (NumTextLines * LineHeight))
  47.  
  48. #define AltTextTop            TextBottom
  49. #define AltTextBottom        (AltTextTop + (NumAltTextLines * LineHeight))
  50.  
  51. #define ButtonTop            (AltTextBottom + A)
  52. #define ButtonBottom        (ButtonTop + ButtonHeight)
  53. #define ActionButtonRight    (AlertWidth - (A - 3))
  54. #define ActionButtonLeft    (ActionButtonRight - ButtonWidth)
  55. #define CancelButtonRight    (ActionButtonLeft - A)
  56. #define CancelButtonLeft    (CancelButtonRight - ButtonWidth)
  57. #define DontSaveButtonRight    (DontSaveButtonLeft + DontSaveButtonWidth)
  58. #define DontSaveButtonLeft    TextLeft
  59. #define ThirdButtonRight    (CancelButtonLeft - A)
  60. #define ThirdButtonLeft        (ThirdButtonRight - ButtonWidth)
  61. #define FourthButtonRight    (ThirdButtonLeft - A)
  62. #define FourthButtonLeft    (FourthButtonRight - ButtonWidth)
  63.  
  64. #define AlertHeight            (ButtonBottom + (A - 3))
  65.  
  66. #define AlertTop            70
  67. #define AlertLeft            20
  68. #define AlertBottom            (AlertTop+AlertHeight)
  69. #define AlertRight            (AlertLeft+AlertWidth)
  70.